

/**
 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved.
 *
 * Description: Aircondition Sample Source. \n
 *
 * History: \n
 * 2023-04-03, Create file. \n
 */

#ifndef _SLE_CAR_H_
#define _SLE_CAR_H_

#include "sle_common.h"
#define MSG_LEN_MAX 32

// 车载设备控制指令枚举
enum  MSG_TYPE{
    NONE_TYPE = 0x58, //88
    DOOR_CHANGE = 0x59,
    TRUNK_CHANGE = 0x5A,
    AIR_CONDITION_CHANGE = 0x5B,
    LIGHT_COLOR_CHANGE = 0x5C,
    ENVIROMENT_CHANGE = 0x5D,
    OBU_ONLINE = 0x5E,
    OBU_OFFLINE = 0x5F
};

// 中控数据结构体
typedef struct {
    enum MSG_TYPE type;
    uint8_t data[4];
}sle_data_t;

extern sle_data_t g_sle_data;

extern unsigned char g_receive_msg[MSG_LEN_MAX]; 
extern int g_aircondition_value;
extern unsigned char g_enviroment_temprature[MSG_LEN_MAX];
extern int g_ambient_light_britness;

extern unsigned char g_local_addr[SLE_ADDR_LEN]; // 设备地址，不同设备需要区分

void Aht20TestTask(void);

#endif